<template>
  <div :class="['GameViewVue']" :id="cls_id">
    <div class="view">
      <div>GameViewVue</div>
      <div @click="gotoPcHandler">PC端</div>
      <div @click="goToMobileHandler">移动端</div>
      <myIndexVue></myIndexVue>
    </div>
  </div>
</template>


<style scoped>
.GameViewVue{
  font-size: 0.14rem;color: black;
}

.view{

}

</style>

<script setup>
/*组件挂载完成后执行的函数；*/
import {ref,reactive,watch,computed,onBeforeUnmount, onMounted, onUnmounted} from "vue";
import { useStore} from 'vuex';
import Enum from "@/js/Enum";
import MyIndexVue from "@/pages/index/views/panel/myIndexVue";



let store = useStore();
let cls_id=winApp.getClsId();

onMounted(() => {
  console.log("GameViewVue onMounted 初始化");

  let url='page/m/index.html';
  if(Util.getAppType()===Enum.appType_0){
    url='page/pc/index.html';
  }
  //window.location.href=url;
});


onBeforeUnmount(() => {
  console.log('GameViewVue onBeforeUnmount');
})
onUnmounted(() => {
  //卸载组件实例后调用,调用此钩子时,组件实例的所有指令都被解除绑定,所有事件侦听器都被移除,所有子组件实例被卸载。
  console.log("GameViewVue onUnmounted 卸载组件实例后  ");
});



let gotoPcHandler=()=>{
  let url='page/pc/index.html';
  window.location.href=url;
}

let goToMobileHandler=()=>{
  let url='page/m/index.html';
  window.location.href=url;
}





</script>



